PATH 
Mac OS 8 and 9 Developer Documentation > Text and Other International Services > Apple Type Services for Unicode Imaging (ATSUI) > Apple Type Services for Unicode Imaging Reference

     

Style Run Attribute Tag Constants

You can pass a style run attribute tag constant of type ATSUAttributeTag to the functions ATSUSetAttributes, ATSUGetAttribute, ATSUGetAllAttributes, and ATSUClearAttributes to identify the style run attribute value you wish to set, obtain, or remove from a style object. If you do not set a style run attribute, it will be set to its default value. Table C-1 lists the Apple-defined style run attribute tags and their corresponding data type, size, and default values.

IMPORTANT

The ATSUAttributeTag type also defines text layout attribute tag constants; see Text Layout Attribute Tag Constants for a description of these tags. Note that if you pass text layout attribute tags to functions that get, set, or remove style run attribute values, the function will return the result code kATSUInvalidAttributeTagErr.

The following constant descriptions assume horizontal text. If you are setting or getting the style run attribute of vertical text, you should interpret these values accordingly.

enum {
    kATSUQDBoldfaceTag                  = 256L,
    kATSUQDItalicTag                    = 257L,
    kATSUQDUnderlineTag                 = 258L, 
    kATSUQDCondensedTag                 = 259L, 
    kATSUQDExtendedTag                  = 260L, 
    kATSUFontTag                        = 261L, 
    kATSUSizeTag                        = 262L, 
    kATSUColorTag                       = 263L, 
    kATSULanguageTag                    = 264L, 
    kATSUVerticalCharacterTag           = 265L, 
    kATSUImposeWidthTag                 = 266L, 
    kATSUBeforeWithStreamShiftTag       = 267L,
    kATSUAfterWithStreamShiftTag        = 268L, 
    kATSUCrossStreamShiftTag            = 269L, 
    kATSUTrackingTag                    = 270L, 
    kATSUHangingInhibitFactorTag        = 271L, 
    kATSUKerningInhibitFactorTag        = 272L, 
    kATSUDecompositionInhibitFactorTag  = 273L, 
    kATSUBaselineClassTag               = 274L, 
    kATSUPriorityJustOverrideTag        = 275L, 
    kATSUNoLigatureSplitTag             = 276L,
    kATSUNoCaretAngleTag                = 277L,
    kATSUSuppressCrossKerningTag        = 278L,
    kATSUNoOpticalAlignmentTag          = 279L,
    kATSUForceHangingTag                = 280L,
    kATSUNoSpecialJustificationTag      = 281L,
    kATSUStyleTextLocatorTag            = 282L,
    kATSUMaxStyleTag                    = 283L,                      
    kATSUMaxATSUITagValue               = 65535L
};
typedef UInt32              ATSUAttributeTag;

Constant descriptions

kATSUQDBoldfaceTag
Identifies the boldfaced text style attribute. You use this tag to set or get a value of type Boolean that indicates whether the text style is boldfaced (causes each glyph to be repeatedly drawn one bit to the right for extra thickness). A value of true indicates that text is boldfaced. If you do not set the attribute value corresponding to this tag, the default value is false, and the text style is plain. Available with ATSUI 1.0.

kATSUQDItalicTag
Identifies the italicized text style attribute. You use this tag to set or get a value of type Boolean that indicates whether the text style is italicized (skews glyph bits above the baseline to the right, bits below the baseline to the left). A value of true indicates that text is italicized. If you do not set the attribute value corresponding to this tag, the default value is false, and the text style is plain. Available with ATSUI 1.0.

kATSUQDUnderlineTag
Identifies the underlined text style attribute. You use this tag to set or get a value of type Boolean that indicates whether the text style is underlined (draws the underline through the entire text line, from the pen starting position through the ending position, plus any offsets from the font or italic kerning). If part of a glyph descends below the base line, generally, the underline isn't drawn through the pixel on either side of the descending par. A value of true indicates that text is underlined. If you do not set the attribute value corresponding to this tag, the default value is false, and the text style is plain. Available with ATSUI 1.0.

kATSUQDCondensedTag
Identifies the condensed text style attribute. You use this tag to set or get a value of type Boolean that indicates whether the text style is condensed (decreases the horizontal distance between all glyphs, including spaces, by the amount that the Font Manager determines is appropriate). A value of true indicates that text is condensed. If you do not set the attribute value corresponding to this tag, the default value is false, and the text style is plain. Available with ATSUI 1.0.

kATSUQDExtendedTag
Identifies the extended text style attribute. You use this tag to set or get a value of type Boolean that indicates whether the text style is extended (increases the horizontal distance between all glyphs, including spaces, by the amount that the Font Manager determines is appropriate). A value of true indicates that text is extended. If you do not set the attribute value corresponding to this tag, the default value is false, and the text style is plain. Available with ATSUI 1.0.

kATSUFontTag
Identifies the font ID attribute. You use this tag to set or obtain a value of type ATSUFontID that uniquely identifies the font to the font management system in ATSUI. If you do not set the attribute value corresponding to this tag, the default value is the ID corresponding to the font family number of the application font for the current script system. To determine this value, evaluate the result of the call GetScriptVariable (smSystemScript,smScriptAppFond). If the application font does not have a corresponding ID, the default value is Helvetica. Available with ATSUI 1.0.

kATSUSizeTag
Identifies the text size attribute. You use this tag to set or obtain a value of type Fixed that represents text size (in typographic points, 72 per inch). If you do not set the attribute value corresponding to this tag, the default value is the application font size for the current script system. To determine this value, evaluate the low word result of the call GetScriptVariable(smSystemScript,smScriptAppFondSize). Available with ATSUI 1.0.

kATSUColorTag
Identifies the text color attribute. You use this tag to set or obtain a value of type RGBColor that represents text color. If you do not set the attribute value corresponding to this tag, the default value is (0,0,0), and the text color will be black. Available with ATSUI 1.0.

kATSULanguageTag
Identifies the language attribute. You use this tag to set or obtain a value of type RegionCode that represents the regional language and other region-dependent characteristics for glyphs. See Region Code Constants for a description of possible values. If you do not set the attribute value corresponding to this tag, the default value is the region code of the system script. To determine this value, evaluate the result of GetScriptVariable (smSystemScript,smScriptLang). Available with ATSUI 1.0.

kATSUVerticalCharacterTag
Identifies the glyph orientation attribute. You use this tag to set or obtain a value of type ATSUVerticalCharacterType that represents glyph orientation; see Glyph Orientation Constants for a description of possible values. Values can range from 0 to 2. To produce vertical text, you must set the corresponding value to the kATSUStronglyVertical constant and the text layout attribute value corresponding to the kATSULineRotationTag tag to -90 degrees. If you do not set the attribute value corresponding to this tag, the default value is kATSUStronglyHorizontal, and glyph orientation will be horizontal. Available with ATSUI 1.0.

kATSUImposeWidthTag
Identifies the imposed width weighting attribute. You use this tag to set or obtain a value of type ATSUTextMeasurement that represents the amount to increase glyph width. Values can range from -1.0 to 1.0. A value of 0 (kATSUNoImposedWidth) indicates that you want to use font-defined imposed width. ATSUI ignores negative values. Positive values increase the font-defined imposed width. If you do not set the attribute value corresponding to this tag, the default value is kATSUNoImposedWidth, and ATSUI uses the font-defined imposed width. Available with ATSUI 1.0.

kATSUBeforeWithStreamShiftTag
 
Identifies the with-stream shift (applied before each glyph) weighting attribute. You use this tag to set or obtain a value of type Fixed that represents the amount to increase or decrease space before glyphs in a style run. Values can range from -1.0 to 1.0. A value of 0 indicates that you want to use font-defined tracking. Negative values decrease space before glyphs, while positive values increase space before glyphs. If you do not set the attribute value corresponding to this tag, the bias is 0, and ATSUI uses the font-defined with-stream shift (applied before each glyph). Available with ATSUI 1.0.

kATSUAfterWithStreamShiftTag
Identifies the with-stream shift (applied after each glyph) weighting attribute. You use this tag to set or obtain a value of type Fixed that represents the amount to increase or decrease space after glyphs in a style run. Values can range from -1.0 to 1.0. A value of 0 indicates that you want to use font-defined tracking. Negative values decrease space after glyphs, while positive values increase space after glyphs. If you do not set the attribute value corresponding to this tag, the bias is 0, and ATSUI uses the font-defined with-stream shift (applied after each glyph). Available with ATSUI 1.0.

kATSUCrossStreamShiftTag
Identifies the cross-stream shift weighting attribute. You use this tag to set or obtain a value of type Fixed that represents the amount to raise or lower glyphs in a style run. Values can range from -1.0 to 1.0. A value of 0 indicates that you want to use font-defined tracking. Negative values shift glyphs downwards from the font-defined cross-stream shift, while positive values shift glyphs upwards from the font-defined cross-stream shift. If you do not set the attribute value corresponding to this tag, the bias is 0, and ATSUI uses the font-defined cross-stream shift. Available with ATSUI 1.0.

kATSUTrackingTag
Identifies the tracking weighting attribute. You use this tag to set or obtain a value of type Fixed that represents the amount to bias font-defined tracking (that is, kerning between all glyphs in the style run, not just the kerning pairs already defined by the font). Values can range from -1.0 to 1.0. A value of 0 indicates that you want to use font-defined tracking. Negative values loosen font-defined tracking, while positive values tighten font-defined tracking. If you do not set the attribute value corresponding to this tag, the default value is kATSUNoTracking, and ATSUI uses the font-defined tracking. Available with ATSUI 1.0.

kATSUHangingInhibitFactorTag
 
Identifies the hanging glyph weighting attribute. You use this tag to set or obtain a value of type Fract that represents the amount to bias font-defined hanging glyph adjustments (that is, adjustments to glyphs that typically extend beyond the text margins and are not counted when line length is measured). Values can range from 0 to 1.0. A value of 0 indicates that you want to use font-defined hanging glyph adjustments; 1 indicates that you want to override font-defined hanging glyph adjustments. If you do not set the attribute value corresponding to this tag, the bias is 0, and ATSUI uses the font-defined hanging glyph adjustments. Available with ATSUI 1.0.

kATSUKerningInhibitFactorTag
Identifies the kerning weighting attribute. You use this tag to set or obtain a value of type Fract that represents the amount to bias font-defined kerning (that is, an adjustment to the normal spacing that occurs between two or more specifically-named glyphs, also called a kerning pair). Values can range from 0 to 1.0. A value of 0 indicates that you want to use font-defined kerning; 1 indicates that you want to override font-defined kerning. If you do not set the attribute value corresponding to this tag, the bias is 0, and ATSUI uses the font-defined kerning. Available with ATSUI 1.0.

kATSUDecompositionInhibitFactorTag
Identifies the ligature decomposition weighting attribute. You use this tag to set or obtain a value of type Fixed that represents the amount to bias the font-defined ligature decomposition threshold (that is, the threshold beyond which a glyph is broken into its component characters during justification). Values can range from -1.0 to 1.0. For example, a value of 0.5 adds 50 percent to the font-specified threshold, while a value of -0.25 subtracts 25 percent from that threshold. If you do not set the attribute value corresponding to this tag, the bias is 0, and ATSUI uses the font-defined threshold. Available with ATSUI 1.0.

kATSUBaselineClassTag
Identifies the baseline type attribute. You use this tag to set or obtain a value of type BslnBaselineClass that represents the type of baseline you want ATSUCalculateBaselineDeltas to use in calculating optimal baseline positions. Values can range from 0 to 31. See Baseline Type Constants for a description of possible values. Typically, values of 0 through 4 are used; the remaining represent application-defined baselines. To specify the standard baseline value from the current font, pass the constant kBSLNNoBaselineOverride. If you do not set the attribute value corresponding to this tag, default value is kBSLNRomanBaseline, and ATSUI uses the Roman baseline. Available with ATSUI 1.0.

kATSUPriorityJustOverrideTag
Identifies the justification behavior and priority override weighting attribute. You use this tag to set or obtain an array of type ATSJustPriorityWidthDeltaOverrides that represents the amount to bias font-defined justification behavior and priority. There are four width delta override structures in the array, one for each justification priority. If you do not set the attribute value corresponding to this tag, the default value is an empty array, and ATSUI uses the font-defined justification behavior and priority. Available with ATSUI 1.0.

kATSUNoLigatureSplitTag
Identifies the indivisible ligature attribute. You use this tag to set or obtain a value of type Boolean that indicates whether ligatures should be treated as their component glyphs or as an indivisible unit for the purpose of caret positioning. A value of true indicates that ligatures will not be split into their component glyphs. In this case, when the caret position is adjacent to one, ATSUI considers the next valid caret position to be across the entire ligature rather than at any point within it. If you do not set the attribute value corresponding to this tag, the default value is false, and ATSUI treats the ligature as divisible (unless the characters are a surrogate pair or a pre-coded Unicode ligature). Available with ATSUI 1.0.

kATSUNoCaretAngleTag
Identifies the straight caret attribute. You use this tag to set or obtain a value of type Boolean that indicates whether the angle of the caret and the highlight region should be parallel to the inherent angle of the text or perpendicular to the baseline. A value of true indicates that the caret and highlight angles will be perpendicular to the baseline. If you do not set the attribute value corresponding to this tag, the default value is false, and the caret and highlight angles will reflect the inherent angle of the text. Available with ATSUI 1.0.

kATSUSuppressCrossKerningTag
Identifies the cross-kerning inhibition attribute. You use this tag to set or obtain a value of type Boolean that indicates whether to inhibit font-defined cross-stream kerning. Setting this value has no impact on manual cross-stream kerning. A value of true inhibits font-defined cross-stream kerning. If you do not set the attribute value corresponding to this tag, the default value is false, and ATSUI uses font-defined cross-stream kerning. Available with ATSUI 1.0.

kATSUNoOpticalAlignmentTag
Identifies the optical alignment inhibition attribute. You use this tag to set or obtain a value of type Boolean that indicates whether to inhibit font-specified optical alignment (the automatic adjustment of glyph position at the ends of lines to give a more even visual appearance to margins). A value of true inhibits font-defined optical alignment. If you do not set the attribute value corresponding to this tag, the default value is false, and ATSUI uses font-defined optical alignment. Available with ATSUI 1.0.

kATSUForceHangingTag
Identifies the force hanging glyphs attribute. You use this tag to set or obtain a value of type Boolean that indicates whether hanging glyphs should extend into the margins. A value of false indicates that hanging glyphs will not extend into the text margins, even if they would normally do so as defined by the font or you (if you set the attribute identified by the kATSUHangingInhibitFactorTag). If you do not set the attribute value corresponding to this tag, the default value is false, and hanging glyphs will not extend into the text margins. Available with ATSUI 1.0.

kATSUNoSpecialJustificationTag
Identifies the inhibit postcompensation actions attribute. You use this tag to set or obtain a value of type Boolean that indicates whether postcompensation actions should occur after glyph positions have been calculated. A value of true indicates that postcompensation actions will not be occur, even if they are needed. If you do not set the attribute value corresponding to this tag, the default value is false, and postcompensation actions will occur if they are needed. Available with ATSUI 1.0.

kATSUStyleTextLocatorTag
Identifies the text locator attribute. You use this tag to set or obtain a value of type TextBreakLocatorRef that contains data needed by ATSUI to form various kind of text breaks. If you do not set the attribute value corresponding to this tag, the default value is NULL, and ATSUI uses the region-derived locator or the default Text Utilities locator. Available with ATSUI 1.2.

kATSUMaxStyleTag
Identifies the maximum value for Apple-defined style run attribute tags. Available with ATSUI 1.1.

kATSUMaxATSUITagValue
Identifies the maximum value for all Apple-defined tags. Values between kATSUMaxStyleTag and kATSUMaxATSUITagValue are reserved. You must select a value greater than kATSUMaxATSUITagValue if you create your own application-defined style run attribute tag. Available with ATSUI 1.1.
VERSION NOTES
This enumeration is available beginning with ATSUI 1.0. Additional constants added with ATSUI 1.1 and 1.2.


© 2000 Apple Computer, Inc. – (Last Updated 25 Jan 00)